

module.exports = function (app) {
    var wish = require('../../controllers/weixin/wish-controller');

    // Get Wish
    app.get('/rest/' + RESTFullServiceVersion + '/wish/getUserWishList/:wechatId', wish.getUserWishList);
    app.get('/rest/' + RESTFullServiceVersion + '/wish/getUserSupportedWishList/:wechatId', wish.getUserSupportedWishList);
    app.get('/rest/' + RESTFullServiceVersion + '/wish/getJingxuanWishList', wish.getJingxuanWishList);

    app.get('/rest/' + RESTFullServiceVersion + '/wish/getWish/:wishId', wish.getWish);
    app.get('/rest/' + RESTFullServiceVersion + '/wish/getWishDetail/:wishId', wish.getWishDetail);
    app.post('/rest/' + RESTFullServiceVersion + '/wish/getRandomWish/:wechatId', wish.getRandomWish);   // body: notWishes (JSON array)

    // =========================== Wish CRUD  ===========================
    // Wish
    app.get('/rest/' + RESTFullServiceVersion + '/wish/makeWish/:wishId/:wechatId', wish.makeWish);
    //app.post('/rest/' + RESTFullServiceVersion + '/wish/updateWish/:wishId', wish.updateWish);
    //app.get('/rest/' + RESTFullServiceVersion + '/wish/removeWish/:wishId', wish.removeWish);
    //app.get('/rest/' + RESTFullServiceVersion + '/wish/solvedWish/:wishId', wish.solvedWish);

    // Wish supporters
    app.get('/rest/' + RESTFullServiceVersion + '/wish/addWishSupporter/:wishId/:wechatId', wish.addWishSupporter);
    app.get('/rest/' + RESTFullServiceVersion + '/wish/removeWishSupporter/:wishId/:wechatId', wish.removeWishSupporter);

    //// Share Wish
    //app.get('/rest/' + RESTFullServiceVersion + '/wish/shareWish/:wishId/:wechatId', wish.shareWish);

};